﻿@model XPressify.Models.ProfileEditModel
@using XPressify.Data.Helpers
@using Omu.Awesome.Core;
@using Omu.Awesome.Mvc.Helpers;
@using XPressify.Controllers

@{
    ViewBag.Title = "Edit profile";
}

<script type="text/javascript">
    $(function () {
        $(".dateTimePicker").datepicker({
            changeMonth: true,
            changeYear: true,
            dateFormat: 'yy-mm-dd',
            minDate: '-100y',
            maxDate: '-1y',
            yearRange: '1900:2010'
        });
    });

    function success() {
    }
</script>

@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)
    <fieldset>
        <legend style="font-size:x-large;color:#222">Profile</legend>



        @Html.HiddenFor(model => model.UserId)
       
        <div class="editor-field">
            @Html.EditorFor(model => model.FirstName)
        </div>

        <div class="editor-field">
            @Html.EditorFor(model => model.LastName)
        </div>

        <div class="editor-field">
            @Html.LabelFor(model => model.Gender) : <br />
            @Html.DropDownListFor(model => model.Gender, new List<SelectListItem> { new SelectListItem { Text = "Male", Value = "M" }, new SelectListItem { Text = "Female", Value = "F" } })
            @Html.ValidationMessageFor(model => model.Gender)
        </div>

        <div class="editor-field">
            @Html.EditorFor(model => model.Email)
        </div>

        <div class="editor-label">
            
        </div>
        <div class="editor-field">
            @Html.LabelFor(model => model.Birthday) : <br />
            @Html.EditorFor(model => model.Birthday)
            @Html.ValidationMessageFor(model => model.Birthday)
        </div>

        <div class="editor-field">
            @Html.LabelFor(model => model.PrivacyType) : <br />
            @Html.DropDownListFor(model => model.PrivacyType, new List<SelectListItem> { new SelectListItem { Text = "Public", Value = SubjectPrivacy.Public.ToString() }, new SelectListItem { Text = "Private", Value = SubjectPrivacy.Private.ToString() } })
            @Html.ValidationMessageFor(model => model.PrivacyType)
        </div>
        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
}

